package edu.maplef.bookwild.config;

/**
 * 系统常量类
 */
public class Constants {

	public final static String DB_APIKEY = "db_apikey";
	public final static String DB_SECRECT = "db_secrect";
	public final static String DB_APPNAME = "db_appname";

	public final static String XN_APIKEY = "xn_apikey";
	public final static String XN_SECRECT = "xn_secrect";
	public final static String XN_APPNAME = "xn_appname";
	public final static String XN_APPID = "xn_appid";

	/**
	 * 豆瓣书籍URL前缀:如 http://www.douban.com/book/enries/
	 */
	public static String DB_BOOK_URL_PREFIX = "db_book_url_perfix";

	public static String XN_AUTHORIZATION_URI = "xn_authorization_uri";
	public static String XN_AUTHORIZATION_RED_URI = "xn_authorization_red_uri";

	public static String XN_ACCESS_TOKEN_URI = "xn_access_token_uri";
	public static String XN_SESSION_KEY_URI = "xn_session_key_uri";

	/**
	 * struts mapping
	 */
	public final static String SUCCESS_KEY = "success";
	public final static String FAILURE_KEY = "failure";
	public final static String LOGOUT_KEY = "logout";
	public final static String NEED_AUTH_KEY = "needauthrized";

	public final static String INDEX_KEY = "index";
	public final static String LIST_KEY = "list";
	public final static String ADD_KEY = "add";
	public final static String EDIT_KEY = "edit";
	public final static String VIEW_KEY = "view";

	public final static String DISPLAY_KEY = "display";

	public static String HTTP_GET = "GET";
	public static String HTTP_POST = "POST";

	/**
	 * 排序方式
	 */

	public final static String ASC = "asc";
	public final static String DESC = "desc";

	/**
	 * 整型和long型定义为空
	 */
	public final static int INT_NULL = Integer.MIN_VALUE;
	public final static int INT_MAX = Integer.MAX_VALUE;
	public final static long LONG_NULL = Long.MIN_VALUE;
	public final static long LONG_MAX = Long.MAX_VALUE;

	/**
	 * 系统缓存的存活时间
	 */
	public static final String CACHE_TIMETOLIVE = "cache_ttl";

	//用于人人网认证的关键字

	public static String PARAM_XN_SIG_IN_IFRAME = "xn_sig_in_iframe";
	public static String PARAM_XN_SIG_TIME = "xn_sig_time";
	public static String PARAM_XN_SIG_ADDED = "xn_sig_added";
	public static String PARAM_XN_SIG_USER = "xn_sig_user";
	public static String PARAM_XN_SIG_SESSION_KEY = "xn_sig_session_key";
	public static String PARAM_XN_SIG_API_KEY = "xn_sig_api_key";
	public static String PARAM_XN_SIG_CLIENT_ID = "client_id";
	public static String PARAM_XN_SIG_CODE = "code";
	public static String PARAM_XN_SIG_CLIENT_SECRET = "client_secret";
	public static String PARAM_XN_SIG_RESPONSE_TYPE = "response_type";
	public static String PARAM_XN_SIG_REDIRECT_URI = "redirect_uri";
	public static String PARAM_XN_SIG_GRANT_TYPE = "grant_type";
	public static String PARAM_XN_SIG_ACCESS_TOKEN = "access_token";

}